﻿using System;
using System.Collections.Generic;
using System.Text;

namespace ttlang.builder
{
    static class AutoBuild
    {
        /// <summary>
        /// 构建ts 项目
        /// </summary>
        public static void BuildTSProj(string path)
        {
            //不同操作系统
            //检查是否安装环境？
            SystemCall.SetWorkingPath(path);
            SystemCall.ClearEnvVar();


            SystemCall.Call("tsc",
            (txt) =>
            {
                Console.WriteLine(String.Format("tsc build log: {0}", txt));
            }
            ,
            (txt) =>
            {
                Console.WriteLine(String.Format("tsc build error: {0}", txt));
            }
            );


        }
    }
}
